import { NavBar} from "antd-mobile";
import React ,{useReducer}from 'react'
import {initState,reducer,actions} from "../Login/user"

export default function Mine(props) {
    const[state,dispath] = useReducer(reducer,initState)
    return (
        <div>
            <NavBar mode="dark">个人中心</NavBar>
            <div>昵称：{state.info.nickname}</div>
            <button onClick={()=>{dispath(actions.changeInfo({}));props.history.push("/login")}}>退出登录</button>
        </div>
    )
}
